package com.lwj.dao;

import com.lwj.entity.Merchant;
import com.lwj.entity.User;

import java.util.List;

public interface MerchantMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Merchant record);

    int insertSelective(Merchant record);

    Merchant selectByPrimaryKey(Integer id);

    /**
     * 获取所有企业信息
     * @return
     */
    List<Merchant> findAll();

    int updateByPrimaryKeySelective(Merchant record);

    int updateByPrimaryKey(Merchant record);

    /**
     * 验证商家登录信息
     * @param user
     * @return
     */
    Merchant findByNameAndPassword(User user);
}